Miscelleaneous – SET HPDFDOC
COMPRESS / PERMISSION / PAGEMODE / PASSWORD / PAGENUMBERING / ENCODING
SET HPDFDOC COMPRESS:
This command is be used to apply compression on the document contents. Level of compression can be specified using various parameters.
Syntax:
SET HPDFDOC COMPRESS NONE|TEXT|IMAGE|METADATA|ALL
Source code example:
SET HPDFDOC COMPRESS NONE
SET HPDFDOC COMPRESS TEXT
SET HPDFDOC COMPRESS IMAGE
SET HPDFDOC COMPRESS METADATA
SET HPDFDOC COMPRESS ALL
SET HPDFDOC PERMISSION:
This command is used to allow/disallow users to do/deny some operations on the document. This command will be effective only if there is owner/user differentiation using SET PASSWORD command.
Syntax:
SET HPDFDOC PERMISSION TO READ|PRINT|EDIT|COPY|EDIT_ALL
Source code example:
SET HPDFDOC PERMISSION TO READ
SET HPDFDOC PERMISSION TO PRINT
SET HPDFDOC PERMISSION TO EDIT
SET HPDFDOC PERMISSION TO COPY
SET HPDFDOC PERMISSION TO EDIT_ALL
SET HPDFDOC PAGEMODE:
This command is used to set the page mode to available page opening modes.
Syntax:
SET HPDFDOC PAGEMODE TO NONE|OUTLINE|THUMBS|FULL_SCREEN
Source code example:
SET HPDFDOC PAGEMODE TO NONE
SET HPDFDOC PAGEMODE TO OUTLINE
SET HPDFDOC PAGEMODE TO THUMBS
SET HPDFDOC PAGEMODE TO FULL_SCREEN
SET HPDFDOC PASSWORD:
This command is used to set password for the owner and/or user. The owner will then have more right over the user than specified in SET PERMISSION command. User password is optional in this command.
Syntax:
SET HPDFDOC PASSWORD OWNER cOwnerPass [ USER cUserPass ]
Source code example:
SET HPDFDOC PASSWORD TO OWNER "Password_1"
SET HPDFDOC PASSWORD TO OWNER "Password_1" USER "Password_2
SET HPDFDOC PAGENUMBERING:
This command is used to set the page numbering style of the PDF Document and the starting page number to be used for that purpose. Lower/Upper case can be used for Roman/Letters number styles.
A prefix can be used to attach before the page numbers in thumbnails.
Syntax:
SET HPDFDOC PAGENUMBERING [ FROM <nPage> ];
[ STYLE DECIMAL|ROMAN|LETTERS ];
[ UPPER|LOWER ];
[ PREFIX cPrefix ]
Source code example:
SET HPDFDOC PAGENUMBERING
SET HPDFDOC PAGENUMBERING FROM PAGE 2
SET HPDFDOC PAGENUMBERING FROM PAGE 2 STYLE ROMAN
SET HPDFDOC PAGENUMBERING FROM PAGE 2 STYLE LETTERS LOWER
SET HPDFDOC PAGENUMBERING FROM PAGE 2 STYLE ROMAN PREFIX "Page: "
SET HPDFDOC ENCODING:
This command is used to set the character encoding of the PDF document to correctly show the characters of various languages other than the default language (English).
Available Character encoding options are StandardEncoding, MacRomanEncoding, WinAnsiEncoding, FontSpecific, ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, ISO8859-6, ISO8859-7, ISO8859-8, ISO8859-9, ISO8859-10, ISO8859-11, ISO8859-13, ISO8859-14, ISO8859-15, ISO8859-16, CP1250, CP1251, CP1252, CP1253, CP1254, CP1255, CP1256, CP1257, CP1258, KOI8-R.
Specified character Encoding shall be applied only to the future text rendering. If you want to apply the character encoding to the whole document, call this command immediately after using START HPDFDOC command.
Click here for more details about Character Encoding
Syntax:
SET HPDFDOC ENCODING TO cEncoding
Source code example:
SET HPDFDOC ENCODING TO "CP1251"
SET HPDFDOC ENCODING TO "ISO8859-13"
SET HPDFDOC ENCODING TO "CP1255”